#include "../symbol_table.h"
#include <stdio.h>
int main(int argc, char *argv[])
{
    symbol_table st=symbol_table_init();
	symbol* temp;
	symbol* a=symbol_create("abc",SYMBOL_INT);
	symbol* b=symbol_create("bcd",SYMBOL_STRING);
	if (temp=symbol_table_get(st,"abc"))
		{
			printf ("find name %s\n",temp->name);
		}
	else{
		printf ("can not find abc\n");
	}

	if(a)
		symbol_table_add(st,a);
	
	else{
		printf ("out of menuey\n");
		return -1;
	}
	if(b)
		symbol_table_add(st,b);
	
	else{
		printf ("out of menuey\n");
		return -1;
	}
	if (temp=symbol_table_get(st,"abc"))
		{
			printf ("find name %s\n",temp->name);
		}
	if (temp=symbol_table_get(st,"bcd"))
		{
			printf ("find name %s\n",temp->name);
		}
	if(symbol_table_delete(st,"bcd"))
		printf ("delete bcd \n");
	if (temp=symbol_table_get(st,"bcd"))
		{
			printf ("find name %s\n",temp->name);
		}
	else{
		printf ("can not find bcd\n");
	}
	symbol_table_destroy(st);
    return 0;
}


